
package com.viweb.storemanager.temp;

import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DocumentFilter;

public class StyleDocumentFilter extends DocumentFilter {

    @Override
    public void insertString(DocumentFilter.FilterBypass fb, int offset, String str,
            AttributeSet attr) throws BadLocationException {
        fb.insertString(offset, str.toUpperCase(), attr);
    }

    @Override
    public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String str,
            AttributeSet attr) throws BadLocationException {
        fb.replace(offset, length, str.toUpperCase(), attr);
    }
}
